package com.linchaoen;

import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.IOException;

public class Ground {

    public int x = 0;
    public int y = 500;
    public BufferedImage bg;

    public Ground() {
        try {
            bg = ImageIO.read(getClass().getResource("ground.png"));
        } catch (IOException e) {
            e.printStackTrace();
            System.out.println("图片不存在");
        }
    }

    //地面移动
    public void step() {
        x--;
        if (x == -100) {
            x = 0;
        }
    }


}
